
/*轮播图*/
var swiper = new Swiper('.swiper-container', {
  spaceBetween: 30,
  centeredSlides: true,
  autoplay: {
    delay: 1000,
    disableOnInteraction: false,
  },
  pagination: {
    el: '.swiper-pagination',
    clickable: true,
  },
  navigation: {
    nextEl: '.swiper-button-next',
    prevEl: '.swiper-button-prev',
  },
});


$(function(){
		
	    var i=1;
       $(".avatar").each(function(n){
       	   $(this).mouseover(function(){
		  	 	    var title =  $(this).siblings(".txt").children("a").text();
		  	 	    i=n+1;
				  	  $(this).parents('.inner').after(
				  	  	'<div class="author-info-card">'+
										        	'<div class="author_img">'+
										        	 	' <img src="img/hot/hot_'+i+'_2.jpg" alt="" />'+
										        	'</div>'+
										        	'<div class="author_title">'+title+
										        	'</div>'+
										        	'<div class="author_content"><span>来日:重庆</span></div>'+
										            '<div class="author-num">'+
											           ' <div class="work">'+
											              '  <p style="">分享</p>'+
											              '  <a href="" title="共分享游记" >9</a>'+
											           ' </div>'+
											           ' <div class="fans">'+
											              '  <p>粉丝</p>'+
											              '  <a href="" title="粉丝" >10</a>'+
											           ' </div>	'+		           
											        '</div> '+
											         '<div class="follow">'+
											            '	 <input type="button"  value="关注" />'+
											       ' </div>'+
										       ' </div>'
				  	  	
				  	  );
		      }) 
       })
		  	 
	  

  	
  		 $(".avatar").mouseout(function(){
    	     $(this).parents('.inner').next().remove();
       })
 
      $(".specialty-item").each(function(n){
				$(this).hover(function(){
					 switch(n){
					 	case 0:
					 	  $(this).find('.travelerChoice').css("background","rgba(0, 166,128, 0.8)");
					   	break;
					   	case 1:
					 	  $(this).find('.travelerChoice').css("background","rgba(255, 102,0, 0.8)");
					   	break;
					   	case 2:
					 	  $(this).find('.travelerChoice').css("background","rgba(69, 171,243, 0.8)");
					   	break;
					   	case 3:
					 	  $(this).find('.travelerChoice').css("background","rgba(69, 243,139, 0.8)");
					   	break;
					 	
					 }
					 console.log(n)
		
				},function(){
					 $(this).find('.travelerChoice').css("background-color","transparent");
				})
	
			})
      
     
  	
  })




      	  	
           
	      

	      
